package Extends;

public class Person {
    private int id;
    private String name;
    private int age;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Person(){
//        默认也会调用无参构造
        System.out.println("调用无参构造创建person对象");
    }

    public Person(int id,String name, int age){
        System.out.println("调用有参构造创建person对象");
    }
}
